#ifndef EYERWANDARTIST_EWAUIPROGRESSBAR_HPP
#define EYERWANDARTIST_EWAUIPROGRESSBAR_HPP

#include "EWAUIWidget.hpp"
#include "EWAUIFrame.hpp"

namespace Eyer
{
    enum class EWAUIProgressBarType
    {
        VERTICAL,
        HORIZONTAL
    };

    typedef EWAUIProgressBarType BarType;

    class EWAUIProgressBar : public EWAUIWidget
    {
    public:
        virtual int OnDraw() override;
        virtual bool OnMouseMoveEvent      (const Vec2I & pos) override;

    public:
        EWAUIProgressBar(BarType _type, EWAUILayoutParams width, EWAUILayoutParams height);
        ~EWAUIProgressBar();

        int SetSize(int _contentSize, int _scrollSize);
        int GetMaginStart();

        int MarginStartChange(int barMarginStart);

    public:
        EyerSmartPtr<EWAUIFrame> bar;

        int marginStart = 0;
        int contentSize = 0;
        int scrollSize = 0;

        int barWidth = 10;
        int barHeight = 10;

        BarType type = BarType::VERTICAL;
    };
}

#endif //EYERWANDARTIST_EWAUIPROGRESSBAR_HPP
